package com.book.system.domain.param;

import com.book.common.annotation.group.InsertGroup;
import com.book.common.annotation.group.UpdateGroup;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 用户注册参数实体类
 * @author Bigboss
 * @create 2024-10-19 16:46
 */
public class AppUserRegisterParam implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户联系电话（登录账号也是这个）
     */
    @NotBlank(message = "请输入手机号", groups = {InsertGroup.class, UpdateGroup.class})
    private String phone;


    /**
     * 用户密码
     */
    @NotBlank(message = "请输入密码", groups = {InsertGroup.class, UpdateGroup.class})
    private String password;


    /**
     * 手机验证码
     */
    @NotBlank(message = "请输入手机验证码", groups = {InsertGroup.class, UpdateGroup.class})
    private String code;


    /**
     * 用户的邀请码（选填）
     */
    private String inviteCode;

    public String getPhone() {
        return phone;
    }

    public AppUserRegisterParam setPhone(String phone) {
        this.phone = phone;
        return this;
    }

    public String getPassword() {
        return password;
    }

    public AppUserRegisterParam setPassword(String password) {
        this.password = password;
        return this;
    }

    public String getCode() {
        return code;
    }

    public AppUserRegisterParam setCode(String code) {
        this.code = code;
        return this;
    }

    public String getInviteCode() {
        return inviteCode;
    }

    public AppUserRegisterParam setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode;
        return this;
    }
}
